import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
import vuexPersist from "vuex-persist";
export default new Vuex.Store({
  state: {
    topCurrent: '0',
    sideCurrent: ''  // 点击的三级菜单名称
  },
  mutations: {
    setTopCurrent(state, data) {
      state.topCurrent = data
    },
    setSideCurrent(state, data) {
      state.sideCurrent = data
    }
  },
  actions: {
  },
  modules: {
  },
  plugins: [
    new vuexPersist({
      storage: window.localStorage,
    }).plugin,
  ],
})